<%--
  Created by IntelliJ IDEA.
  User: Smile
  Date: 2019/3/1
  Time: 11:49
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn" %>
<header>
    <div class="navbar navbar-inverse navbar-fixed-top">
        <div class="navbar-inner">
            <div class="container">
                <button type="button" class="btn btn-navbar" data-toggle="collapse" data-target=".nav-collapse">
                    <span class="icon-bar"></span>
                    <span class="icon-bar"></span>
                    <span class="icon-bar"></span>
                </button>
                <a class="brand" href="mobile/mobile-home">知识学院</a>
                <div class="nav-collapse collapse">
                    <ul class="nav">
                        <li class="active"><a href="mobile/mobile-home">主页</a></li>
                        <li><a href="student/mobile/mobile-practice-list">试题练习</a></li>
                        <li><a href="student/mobile/mobile-question-add">贡献试题</a></li>
                        <li><a href="student/mobile/mobile-exam-list">在线考试</a></li>
                    </ul>
                    <div class="col-xs-7" id="login-info">
                        <c:choose>
                            <c:when test="${not empty sessionScope.SPRING_SECURITY_CONTEXT.authentication.principal.username}">
                                <div id="login-info-user">

                                        <%--<a href="user-detail/${sessionScope.SPRING_SECURITY_CONTEXT.authentication.principal.username}"
                                               id="system-info-account"
                                               target="_blank">${sessionScope.SPRING_SECURITY_CONTEXT.authentication.principal.username}</a>--%>
                                    <span style="color: #0e90d2">${sessionScope.SPRING_SECURITY_CONTEXT.authentication.principal.username}</span>
                                    <span>|</span>
                                    <a href="j_spring_security_logout"><i class="fa fa-sign-out"></i> 退出</a>
                                </div>
                            </c:when>
                            <c:otherwise>
                                <a class="btn btn-success" href="mobile/mobile-login">登录</a>
                            </c:otherwise>
                        </c:choose>
                    </div>
                </div><!--/.nav-collapse -->
            </div>
        </div>
    </div>
</header>